<template>
  <div id="app">
    <Header></Header>
    <!-- 书写路由组件出口 -->
    <router-view></router-view>
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>
 
<script>
import Header from "./components/Header/MyHeader.vue";
import Footer from "./components/Footer/MyFooter.vue";

export default {
  name: "App",
  components: {
    Header,
    Footer,
  },
  mounted() {
    // 派发一个action||获取商品分类三级列表
    this.$store.dispatch("categoryList");
  },
};
</script>
 
<style>
</style>